#coding=utf-8
"""
===========================
Author:杭州多测师_周sir
Time:2022/9/16 09:47
website:https://duoceshi.net
===========================
"""
'''封装一个登陆的公共方法'''
from utils.hand_conf import conf
from utils.hand_requests import Send_Requests

class Cms_Login():

    def login(self):
        request = Send_Requests()
        url = conf.get_value('env', 'url') + '/cms/manage/loginJump.do'
        data = {"userAccount": conf.get_value("test_data", "username"),
                "loginPwd": conf.get_value("test_data", "pwd")}

        headers = eval(conf.get_value("env", "headers"))
        response = request.send(method="post", url=url, data=data, headers=headers)
        return request



